<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript" src="./resources/js/jquery-1.11.1.min.js"></script>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
	
</script>
<title>Insert title here</title>
</head>
 <body>
    	<form action="${pageContext.request.contextPath}/user/add" method="post" >
    		用户昵称:<input type="text" name="nickname" id="nickname" ><br />    			
    		用户名&emsp;:<input type="text" name="comment.articleId" id="account" onblur="checkName()" class="text"><span id="tishi"></span><br />
    		用户密码:<input type="password" name="password" id="password"/><br />
    		<button type="reset">重置</button><button type="submit">注册</button>
    		
    	</form>
    <script type="text/javascript">

    function checkName() {
        var account = $("#account").val();
        //获取账号后的提示信息文本
        var tishi = document.getElementById("tishi");
        $.ajax({
            url : "http://localhost/article/query.action", //后台查询验证的方法
            data : {
                "comment.articleId" : 1
            }, //携带的参数
            type : "post",
            success : function(msg) {
                
            }
        });

    }
	</script>
 	</body>
</html>